<!doctype html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="shortcut icon" href="/favicon.ico" />

    <link href="/app/laoha/css/bootstrap.min.css" rel="stylesheet">
    <link href="/app/laoha/vendor/fontawesome-free/css/all.min.css" rel="stylesheet">
    <link href="/app/laoha/vendor/magnific-popup/magnific-popup.min.css" rel="stylesheet">
    <script src="/app/laoha/js/bootstrap.bundle.min.js"></script>
    <script src="/app/laoha/js/jquery.min.js"></script>
    <script src="/app/laoha/js/webman.js"></script>
    <script src="/app/laoha/js/common.js"></script>
    <script src="/app/laoha/vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
    <title>
        <?=htmlspecialchars($title)?>
    </title>
    <script>
        var config = <?= json_encode(config('plugin.laoha.set.app.post', []), JSON_UNESCAPED_UNICODE) ?>;
        var nickname = '<?=user('nickname')?:''?>';
        var avatar = '<?=user('avatar')?:''?>';
        $(document).ready(function () {
            $('.image-link').magnificPopup({ type: 'image' });
            $('.image-div').magnificPopup({
                delegate: 'a', // child items selector, by clicking on it popup will open
                type: 'image',
                gallery: {
                    // options for gallery
                    enabled: true
                },
            });

            window.onscroll = function () {
                if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
                    $("#go-to-top").addClass("d-block");
                    $("#go-to-top").removeClass("d-none");
                } else {
                    $("#go-to-top").addClass("d-none");
                    $("#go-to-top").addClass("d-block");
                }
            };

            // When the user clicks on the button, scroll to the top of the document
            $("#go-to-top").click(function () {
                document.body.scrollTop = 0; // For Safari
                document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
            });
        });
    </script>
    <style>
        .content img {
            max-width: 100%;
        }

        .comment-content img {
            border: 1px solid gray !important;
            padding: 5px;
            margin: 5px auto;
        }

        #go-to-top {
            position: fixed;
            bottom: 40px;
            right: 20px;
            display: none;
            z-index: 9;
        }
        #go-to-top button{
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 50%;
            padding: 12px;
            font-size: 16px;
            cursor: pointer;
        }
    </style>
</head>

<body class="bg-light ready sticky body-blog">
    <button id="go-to-top" title="回到顶部">
        <i class="fa fa-chevron-up"></i>
    </button>